<script>
{% set entity = { 'parent': 'CmUserInfo', 'child': 'CmUser' } %}
{% render "AcmeSecurityBundle:JsValidator:jsConstraintsGenerator" with { 'form': form, 'options': { 'entity': entity } } %}
</script>
<form class="form-horizontal" id="{{ form.vars.id }}" {{ form_enctype(form) }}>
	<input type="hidden" name="id" value="{{ user.id }}" />
	{% if userCategoryEn[user.category] != 'outsider' %}
	<fieldset>
	<legend>详细信息</legend>
		{% if userCategoryEn[user.category] != 'university-admin' %}
		{{ form_row(form.name, { 'value': user.userInfo.name }) }}
		{{ form_row(form.gender, { 'value': user.userInfo.gender }) }}
		{{ form_row(form.birth, { 'value': (user.userInfo.birth) ? (user.userInfo.birth.date) : '' }) }}
		{% endif %}
		
		{% if userCategoryEn[user.category] == 'student' %}
		{{ form_row(form.stuNum, { 'value': user.userInfo.stuNum }) }}
		{% endif %}
		
		{{ form_row(form.university, { 'value': user.userInfo.university }) }}
		
		{% if userCategoryEn[user.category] != 'university-admin' %}
		{{ form_row(form.phone, { 'value': user.userInfo.phone }) }}
		{{ form_row(form.qq, { 'value': user.userInfo.qq }) }}
		{{ form_row(form.idCard, { 'value': user.userInfo.idCard }) }}
		{% endif %}
	</fieldset>
	{% endif %}
	
	{{ form_rest(form) }}
</form>